TARGET = cam2

LIBS = -lglut -lGLU -lGL -lXmu -lXext -lXi -lX11 -lm
#LIBS = -lglut -lGLU -lGL -lXext -lX11 -lm
CFLAGS = -g -std=c99 #-Wall -ansi -pedantic

CC = gcc

default: $(TARGET)

all: default

functions.o: headers.h functions.c
	$(CC) -c functions.c

#$@.o: *.c *.h
#	$(CC) $(CFLAGS) -c $<

$(TARGET): functions.o $(TARGET).c
	$(CC) $@.c $(CFLAGS) $(LIBS) -o $@ functions.o

run: all
	./$(TARGET)&

clean:
	-rm -f *.o $(TARGET)

cleanall: clean
	rm -f *~